# from weixin.mp import WeixinMP
# import redis,json
# from ..extensions import pool
# def signaaa(url):
#     redis_store = redis.Redis(connection_pool=pool)
#     sign=redis_store.lrange(url,0,2)
#     if sign:
#         print('从redis中获取')
#         print(sign[1].decode("utf-8"),json.loads(sign[0].decode("utf-8")))
#         return sign[1].decode("utf-8"),json.loads(sign[0].decode("utf-8"))
#         # access_token,jsapi=sign.decode("utf-8").split('-')
#     else:
#         app_id='wxb19c3fb62e4b0e5e'
#         app_secret='c7f72732e21277778e2e4f181aa32bd8'
#         mp = WeixinMP(app_id, app_secret)
#         access_token=mp.access_token
#         jsapi=mp.jsapi_sign(url=url)
#         redis_store.lpush(url,access_token)
#         redis_store.lpush(url,json.dumps(jsapi))
#         redis_store.expire(url,60*60*2)
#         return access_token,jsapi

#
#
#
